<!--
 *************************************************************************
 * The contents of this file are subject to the Openbravo  Public  License
 * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
 * Version 1.1  with a permitted attribution clause; you may not  use this
 * file except in compliance with the License. You  may  obtain  a copy of
 * the License at http://www.openbravo.com/legal/license.html 
 * Software distributed under the License  is  distributed  on  an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific  language  governing  rights  and  limitations
 * under the License. 
 * The Original Code is Openbravo ERP. 
 * The Initial Developer of the Original Code is Openbravo SL 
 * All portions are Copyright (C) 2001-2006 Openbravo SL 
 * All Rights Reserved. 
 * Contributor(s):  ______________________________________.
 ************************************************************************
-->
<HTML>
<HEAD>
<TITLE>Payment selector</TITLE>
<SCRIPT language="JavaScript" type="text/javascript" id="paramDirection">var baseDirection = "../../../../../web/";</SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" type="text/javascript" id="paramLanguage">	LNG_POR_DEFECTO = "en_US";</SCRIPT>
<SCRIPT language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></SCRIPT>
<SCRIPT language="JavaScript" type="text/javascript">
function cargarDatos() {
	var radio=document.frmMain.inpClave;
	var cinco=parent.cinco;
	var total=0;
	if (cinco && cinco.document.frmMain) {
		if (!radio) return false;
		else if (!radio.length) {
			if (radio.checked) {
				if (document.frmMain.inpmProductId.value==eval("document.frmMain.inpProduct" + radio.value + ".value")) {
					if (document.frmMain.inpsearchmode.value=="0") {
						total += parseFloat(eval("document.frmMain.inpTotal" + radio.value + ".value"));
					}
					total -= parseFloat(eval("document.frmMain.inpMatched" + radio.value + ".value"));
				} else {
					radio.checked=false;
				}
			}
		} else {
			for (var i=0;i<radio.length;i++) {
				if (radio[i].checked) {
					if (document.frmMain.inpmProductId.value==eval("document.frmMain.inpProduct" + radio[i].value + ".value")) {
						if (document.frmMain.inpsearchmode.value=="0") {
							total += parseFloat(eval("document.frmMain.inpTotal" + radio[i].value + ".value"));
						}
						total -= parseFloat(eval("document.frmMain.inpMatched" + radio[i].value + ".value"));
					} else {
						radio[i].checked=false;
					}
				}
			}
		}
		cinco.setMatching(total);
	}
	return true;
}
</SCRIPT>
</HEAD>
<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="focoPrimerControl();">
<FORM name="frmMain" method="POST" action="MatchingPO-Receipt-Invoice_FS.html">
  <INPUT type="hidden" name="Command"></INPUT>
  <INPUT type="hidden" name="inpmProductId" value="" id="paramProduct"></INPUT> 
  <INPUT type="hidden" name="inpsearchmode" value="" id="paramSearchMode"></INPUT> 
  <INPUT type="hidden" name="inpsourcedoc" value="" id="paramSourceDoc"></INPUT> 
  <INPUT type="hidden" name="inpfinaldoc" value="" id="paramFinalDoc"></INPUT> 
  <INPUT type="hidden" name="inpMatchLine" value="" id="paramMatchLine"></INPUT> 
  <INPUT type="hidden" name="inpMatchQty"></INPUT>
  <TABLE width="100%" border="1" cellspacing="0" cellpadding="0" >
    <TR> 
      <td width="2%"> <INPUT type="checkbox" name="inpCheckAll" onclick="marcarTodos(document.frmMain.inpClave, this.checked);cargarDatos();return true;" ></INPUT>
      </td>
      <td width="13%">Doc. No.:</td>
      <td width="10%">Date</td>
      <td width="29%">Business Partner</td>
      <td width="9%">Line No.:</td>
      <td width="21%">Product</td>
      <td width="7%">Quantity</td>
      <td width="9%">Conformed</td>
    </TR>
    <DIV id="sectionDetail"> 
      <TR > 
        <TD width="2%"> <INPUT type="checkbox" name="inpClave" value="xx" onclick="cargarDatos();return true;"  id="fieldClave"></INPUT> 
          <INPUT type="hidden" name="inpMatchedxx" value="xx" id="fieldMatchedImporte"></INPUT> 
          <INPUT type="hidden" name="inpTotalxx" value="xx" id="fieldTotalImporte"></INPUT> 
          <INPUT type="hidden" name="inpProductxx" value="xx" id="fieldProductLine"></INPUT>
        </TD>
        <TD width="13%" id="fieldDocumentNo" >xx12345</TD>
        <TD width="10%" id="fieldDate" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldBpartnerDes">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldLineNo">xx10</TD>
        <TD width="21%" id="fieldProductDes">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldQty" >xx45</TD>
        <TD width="9%" id="fieldMatched" >xx45</TD>
      </TR>
    </DIV>
    <DIV class="discard"> 
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
      <TR > 
        <TD width="2%"> <INPUT type="radio" name="inpMTransactionId" value="xx" onclick="cargarDatos('xx');return true;"  id="fieldMTransactionId"></INPUT>
        </TD>
        <TD width="13%" id="fieldOrganization" >xx12345</TD>
        <TD width="10%" id="fieldLocator" >xx15/03/2490&nbsp;</TD>
        <TD width="29%" id="fieldMovementdate">xxCementos Sarobe enterprise</TD>
        <TD width="9%" id="fieldProduct">xx10</TD>
        <TD width="21%" id="fieldMovementType">xxFortac 10-200-104 30x40</TD>
        <TD width="7%" id="fieldMovementqty" >xx45</TD>
        <TD width="9%" id="fieldSRLine" >xx45</TD>
      </TR>
    </DIV>
  </TABLE>
</FORM>
</BODY>
</HTML>
